####################################
# Japan 22000 - 22999 by Radu
#		22500 - 22599 = Minister Change Events
####################################

# War with China Buildup

# Phase 1 - Landings in North China
# Phase 2 - Landings in South China
# Phase 3 - Push to Center

# War in the Pacific Buildup

# Phase 1 - Guam,Wake,Hong Kong
# Phase 2 - Philippines
# Phase 3 - Dutch East Indies & Malaysia
# Phase 4 - East New Guinea & South-East Pacific Islands
# Phase 5 - New Zealand
# Phase 6 - Australia
# Phase 7 - East Pacific & Hawaii

####################################

##########################
# War with China Buildup #
##########################

event = {

	id = 22000
	random = no
	country = JAP

	trigger = {
		ai = yes
		atwar = no
		year = 1937
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {

		command = { type = ai which = "switch/JAP_China_Buildup.ai" }
		command = { type = local_setflag which = JAP_AI_China_Buildup }		

	}

}

# Phase 1 - Landings in North China

event = {

	id = 22001
	random = no
	country = JAP

	trigger = {
		ai = yes

		local_flag = JAP_AI_China_Buildup # Buildup executed

		war = { country = JAP country = CHI }
		#war = { country = JAP country = CSX }
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_China_North_Landings.ai" }
	}
}

# Phase 2 - Landings in South China

event = {
	
	id = 22002
	random = no
	country = JAP

	trigger = {		
		ai = yes

		local_flag = JAP_AI_China_Buildup # Buildup executed

		war = { country = JAP country = CHI }
		#war = { country = JAP country = CSX }

		# North China coastline secure
		control = { province = 1204  data = JAP } # Tianjin
		control = { province = 1214  data = JAP } # Yantai
		control = { province = 1215  data = JAP } # Qingdao
		control = { province = 1217  data = JAP } # Nantong
		control = { province = 1219  data = JAP } # Lianyungang
		control = { province = 1237  data = JAP } # Shanghai			
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_China_South_Landings.ai" }
	}
}

# Phase 3 - Push to Center

event = {
	
	id = 22003
	random = no
	country = JAP

	trigger = {

		ai = yes

		local_flag = JAP_AI_China_Buildup # Buildup executed

		war = { country = JAP country = CHI }
		#war = { country = JAP country = CSX }

		# North China coastline secure
		control = { province = 1204  data = JAP } # Tianjin
		control = { province = 1214  data = JAP } # Yantai
		control = { province = 1215  data = JAP } # Qingdao
		control = { province = 1217  data = JAP } # Nantong
		control = { province = 1219  data = JAP } # Lianyungang
		control = { province = 1237  data = JAP } # Shanghai

		# South China coastline secure

		control = { province = 1313  data = JAP } # Guangzhou
		control = { province = 1314  data = JAP } # Bao'an
		control = { province = 1321  data = JAP } # Hainan
		control = { province = 1320  data = JAP } # Zhanjiang		
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_China_Center_Push.ai" }
	}
}

################################
# War in the Pacific Buildup   #
################################

event = {

	id = 22004
	random = no
	country = JAP

	trigger = {
		ai = yes
		event = 3800 # US embargo against Japan
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Buildup.ai" }		
	}
}

event = {

	id = 22005
	random = no
	country = JAP

	trigger = {
		ai = yes
		event = 3800 # US embargo against Japan
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = december year = 1941 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = war which = USA }	
		command = { type = war which = ENG }
		command = { type = war which = HOL }	
		command = { type = war which = AST }
		command = { type = war which = PHI }
		command = { type = dissent value = -50 }
	}
}

# Phase 1 - Hong Kong,Guam,Wake

event = {

	id = 22006
	random = no
	country = JAP

	trigger = {
		ai = yes
		war = { country = JAP country = USA }
		war = { country = JAP country = ENG }
		#war = { country = JAP country = HOL }
		#war = { country = JAP country = AST }
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Phase1.ai" }
	}
}

# Phase 2 - Philippines

event = {

	id = 22007
	random = no
	country = JAP

	trigger = {
		ai = yes
		war = { country = JAP country = USA }
		#war = { country = JAP country = ENG }
		#war = { country = JAP country = HOL }
		war = { country = JAP country = PHI }

		# 2 of 3 Phase 1 objectives achieved
		OR = {
			AND = {
				control = { province = 1315  data = JAP } # Hong Kong
				control = { province = 1786  data = JAP } # Wake				
			}

			AND = {
				control = { province = 1315  data = JAP } # Hong Kong				
				control = { province = 1624  data = JAP } # Guam
			}

			AND = {				
				control = { province = 1786  data = JAP } # Wake
				control = { province = 1624  data = JAP } # Guam
			}
		}
		
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 1
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Phase2.ai" }
	}
	
}

# Phase 3 - Dutch East Indies & Malaysia

event = {

	id = 22008
	random = no
	country = JAP

	trigger = {
		ai = yes
		#war = { country = JAP country = USA }
		war = { country = JAP country = ENG }
		war = { country = JAP country = HOL }
		#war = { country = JAP country = AST }

		# Phase 2 largely successful
		control = { province = 1737  data = JAP } # Manila
		control = { province = 1739  data = JAP } # Clark Field
		
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 10
	deathdate = { day = 1 month = january year = 1999 }	

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Phase3.ai" }
	}
}

# Phase 4 - East New Guinea, South-East Pacific Islands

event = {

	id = 22009
	random = no
	country = JAP

	trigger = {
		ai = yes
		war = { country = JAP country = USA }
		war = { country = JAP country = ENG }
		war = { country = JAP country = HOL }
		war = { country = JAP country = AST }

		# Phase 3 largely successful
		control = { province = 1359  data = JAP } # Oosthaven
		control = { province = 1628  data = JAP } # Batavia
		control = { province = 1632  data = JAP } # Sorebaja
		control = { province = 1653  data = JAP } # Menado		
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 10
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Phase4.ai" }
	}
	
}

# Phase 5 - New Zealand

event = {

	id = 22010
	random = no
	country = JAP
	
	trigger = {
		ai = yes
		war = { country = JAP country = USA }
		war = { country = JAP country = ENG }
		#war = { country = JAP country = HOL }
		war = { country = JAP country = AST }

		#Phase 4 successful
		control = { province = 1670  data = JAP } # Rabaul
		control = { province = 1679  data = JAP } # Port Moresby
		control = { province = 1685  data = JAP } # Guadalcanal
		control = { province = 1692  data = JAP } # Noumea
		control = { province = 1752  data = JAP } # Fiji		
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 10
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Phase5.ai" }
	}
}

# Phase 6 - Australia

event = {

	id = 22011
	random = no
	country = JAP

	trigger = {
		ai = yes
		war = { country = JAP country = USA }
		war = { country = JAP country = ENG }
		#war = { country = JAP country = HOL }
		war = { country = JAP country = AST }

		# Phase 5 successful
		control = { province = 1871  data = JAP } # Wellington
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 10
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Phase6.ai" }
	}
}

# Phase 7 - East Pacific & Hawaiis

event = {

	id = 22012
	random = no
	country = JAP

	trigger = {
		ai = yes
		war = { country = JAP country = USA }
		#war = { country = JAP country = ENG }
		#war = { country = JAP country = HOL }
		#war = { country = JAP country = AST }

		# Phase 6 successful
		control = { province = 1703  data = JAP } # Darwin
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 2 month = january year = 1937 }
	offset = 10
	deathdate = { day = 1 month = january year = 1999 }

	action_a = {
		command = { type = ai which = "switch/JAP_Pacific_War_Phase7.ai" }
	}
}

################
# production change events by Pang Bingxun
#############################################

event = {
	id = 22013
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		technology = 5410 # 1937 BD Radar
		NOT = { technology = 7210 } # 1948 Nuclear Sub
		NOT = { local_flag = jap_build_land_1936 }
		OR = {
			AND = {
				manpower = 100
				NOT = { army = 25 }
			}
			AND = {
				manpower = 200
				NOT = { army = 50 }
			}
			AND = {
				manpower = 300
				NOT = { army = 75 }
			}
			AND = {
				manpower = 400
				NOT = { army = 100 }
			}
			AND = {
				manpower = 500
				NOT = { army = 125 }
			}
			AND = {
				manpower = 600
				NOT = { army = 150 }
			}
			AND = {
				manpower = 700
				NOT = { army = 175 }
			}
			AND = {
				manpower = 800
				NOT = { army = 200 }
			}
			AND = {
				manpower = 900
				NOT = { army = 225 }
			}
			AND = {
				manpower = 1000
				#NOT = { army = 250 }
			}
		}
	}

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	name = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = ai which = "switch/jap_build_land.ai" }
		command = { type = local_setflag which = jap_build_land_1936 }
		command = { type = local_clrflag which = jap_build_land_1948 }
		command = { type = local_clrflag which = jap_build_standard_1936 }
		command = { type = local_clrflag which = jap_build_standard_1948 }
	}
}

event = {
	id = 22014
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		technology = 5410 # 1937 BD Radar
		technology = 7210 # 1948 Nuclear Sub
		NOT = { local_flag = jap_build_land_1948 }
		OR = {
			AND = {
				manpower = 100
				NOT = { army = 25 }
			}
			AND = {
				manpower = 200
				NOT = { army = 50 }
			}
			AND = {
				manpower = 300
				NOT = { army = 75 }
			}
			AND = {
				manpower = 400
				NOT = { army = 100 }
			}
			AND = {
				manpower = 500
				NOT = { army = 125 }
			}
			AND = {
				manpower = 600
				NOT = { army = 150 }
			}
			AND = {
				manpower = 700
				NOT = { army = 175 }
			}
			AND = {
				manpower = 800
				NOT = { army = 200 }
			}
			AND = {
				manpower = 900
				NOT = { army = 225 }
			}
			AND = {
				manpower = 1000
				#NOT = { army = 250 }
			}
		}
	}

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	name = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = ai which = "switch/jap_build_land_1948.ai" }
		command = { type = local_clrflag which = jap_build_land_1936 }
		command = { type = local_setflag which = jap_build_land_1948 }
		command = { type = local_clrflag which = jap_build_standard_1936 }
		command = { type = local_clrflag which = jap_build_standard_1948 }
	}
}

event = {
	id = 22048
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		technology = 5410 # 1937 BD Radar
		NOT = { technology = 7210 } # 1948 Nuclear Sub
		NOT = { local_flag = jap_build_standard_1936 }
		OR = {
			AND = {
				army = 25 
				NOT = { manpower = 100 }
			}
			AND = {
				army = 50 
				NOT = { manpower = 200 }
			}
			AND = {
				army = 75 
				NOT = { manpower = 300 }
			}
			AND = {
				army = 100 
				NOT = { manpower = 400 }
			}
			AND = {
				army = 125 
				NOT = { manpower = 500 }
			}
			AND = {
				army = 150 
				NOT = { manpower = 600 }
			}
			AND = {
				army = 175 
				NOT = { manpower = 700 }
			}
			AND = {
				army = 200 
				NOT = { manpower = 800 }
			}
			AND = {
				army = 225 
				NOT = { manpower = 900 }
			}
			AND = {
				army = 250 
				NOT = { manpower = 1000 }
			}
		}
	}

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	name = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = ai which = "switch/jap_build_standard.ai" }
		command = { type = local_clrflag which = jap_build_land_1936 }
		command = { type = local_clrflag which = jap_build_land_1948 }
		command = { type = local_setflag which = jap_build_standard_1936 }
		command = { type = local_clrflag which = jap_build_standard_1948 }
	}
}

event = {
	id = 22049
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		technology = 5410 # 1937 BD Radar
		technology = 7210 # 1948 Nuclear Sub
		NOT = { local_flag = jap_build_standard_1948 }
		OR = {
			AND = {
				army = 25 
				NOT = { manpower = 100 }
			}
			AND = {
				army = 50 
				NOT = { manpower = 200 }
			}
			AND = {
				army = 75 
				NOT = { manpower = 300 }
			}
			AND = {
				army = 100 
				NOT = { manpower = 400 }
			}
			AND = {
				army = 125 
				NOT = { manpower = 500 }
			}
			AND = {
				army = 150 
				NOT = { manpower = 600 }
			}
			AND = {
				army = 175 
				NOT = { manpower = 700 }
			}
			AND = {
				army = 200 
				NOT = { manpower = 800 }
			}
			AND = {
				army = 225 
				NOT = { manpower = 900 }
			}
			AND = {
				army = 250 
				NOT = { manpower = 1000 }
			}
		}
	}

	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	name = "AI_EVENT"
	style = 0

	action_a = {
		command = { type = ai which = "switch/jap_build_standard_1948.ai" }
		command = { type = local_clrflag which = jap_build_land_1936 }
		command = { type = local_clrflag which = jap_build_land_1948 }
		command = { type = local_clrflag which = jap_build_standard_1936 }
		command = { type = local_setflag which = jap_build_standard_1948 }
	}
}

#event = {
#	id = 22048
#	random = no 
#	country = JAP
#
#	trigger = {
#		ai = yes
#		NOT = { technology = 5410 } # 1937 BD Radar
#	}
#
#	name = "AI_EVENT"
#	style = 0	
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = gain_tech which = 5410 } # 1937 BD Radar
#	}
#}
#
################
# Reinforcements balance events by Pang Bingxun
#############################################

event = { 
	id = 22015
	random = no 
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		NOT = { local_flag = reinforcement_020 }
		NOT = { manpower = 1 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/reinforcement_020.ai" }
		command = { type = local_setflag which = reinforcement_020 }
		command = { type = local_clrflag which = reinforcement_050 }
	}
}

event = { 
	id = 22016
	random = no 
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		NOT = { local_flag = reinforcement_050 }
		manpower = 3
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/reinforcement_050.ai" }
		command = { type = local_clrflag which = reinforcement_020 }
		command = { type = local_setflag which = reinforcement_050 }
	}
}

################
# Japan joins axis
#############################################

event = { 
	id = 22017
	random = no 
	country = JAP

	trigger = {
		ai = yes
		ai = GER
		control = { province = 187 data = GER } # Leningrad has fallen
		control = { province = 163 data = GER } # Stalingrad has fallen
		control = { province = 175 data = GER } # Moscow has fallen
		control = { province = 1907 data = GER } # Baku has fallen
		OR = {
			AND = {
				war = { country = GER country = USA }
				war = { country = JAP country = USA }
			}
			AND = {
				NOT = { war = { country = GER country = USA } }
				NOT = { war = { country = JAP country = USA } }
				land_percentage = { country = SOV value = 1.0 }
			}
		}
#		OR = {
#			AND = {
#				NOT = { war = { country = JAP country = CHI } }
#				NOT = { war = { country = GER country = CHI } }
#			}
#			AND = {
#				war = { country = JAP country = CHI }
#				war = { country = GER country = CHI }
#			}
#		}
		NOT = { war = { country = JAP country = GER } }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = alliance which = GER }
	}
}

#########################################
# Low upgrades early
#########################################

event = {
	id = 22018
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = Upgrading_000 }
		atwar = no
		NOT = { year = 1937 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/Upgrading_000.ai" }
		command = { type = local_setflag which = Upgrading_000 }
		command = { type = local_clrflag which = Upgrading_035 }
	}
}

event = {
	id = 22019
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { local_flag = Upgrading_035 }
		OR = {
			atwar = yes
			year = 1937
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ai which = "switch/Upgrading_035.ai" }
		command = { type = local_clrflag which = Upgrading_000 }
		command = { type = local_setflag which = Upgrading_035 }
	}
}

################
# Resource transfer events by Pang Bingxun
#############################################

event = {
	id = 22020
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = JapanNotLowOnEnergy }
		energy = 3000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = JapanNotLowOnEnergy }
	}
}

event = {
	id = 22021
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		flag = JapanNotLowOnEnergy
		NOT = { energy = 2000 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = JapanNotLowOnEnergy }
	}
}

event = {
	id = 22022
	random = no 
	country = JAP
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = energypool value = -60 }
		command = { type = supplies value = 15 } # 60 x 1 / 6 x 1.5
	}
}

event = {
	id = 22023
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = JapanNotLowOnMetal }
		metal = 2000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = JapanNotLowOnMetal }
	}
}

event = {
	id = 22024
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		flag = JapanNotLowOnMetal
		NOT = { metal = 1500 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = JapanNotLowOnMetal }
	}
}

event = {
	id = 22025
	random = no 
	country = JAP
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = metalpool value = -60 }
		command = { type = supplies value = 30 } # 60 x 2 / 6 x 1.5
	}
}

event = {
	id = 22026
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = JapanNotLowOnRares }
		rare_materials = 2000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = JapanNotLowOnRares }
	}
}

event = {
	id = 22027
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		flag = JapanNotLowOnRares
		NOT = { rare_materials = 1500 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = JapanNotLowOnRares }
	}
}

event = {
	id = 22028
	random = no 
	country = JAP
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = rarematerialspool value = -60 }
		command = { type = supplies value = 60 } # 60 x 4 / 6 x 1.5
	}
}

event = {
	id = 22029
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { flag = JapanNotLowOnOil }
		oil = 2000
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = setflag which = JapanNotLowOnOil }
	}
}

event = {
	id = 22030
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		flag = JapanNotLowOnOil
		NOT = { oil = 1500 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = clrflag which = JapanNotLowOnOil }
	}
}

event = {
	id = 22031
	random = no 
	country = JAP
	persistent = yes
	# triggered by various events
	name = "AI_EVENT"
	style = 0
	
	action_a = {
		command = { type = oilpool value = -60 }
		command = { type = supplies value = 45 } # 60 x 3 / 6 x 1.5
	}
}

event = {
	id = 22032
	random = no 
	country = MAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnEnergy
		puppet = { country = MAN country = JAP } 
		NOT = { energy = 900 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 22022 }
	}
}

event = {
	id = 22033
	random = no 
	country = MAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnMetal
		puppet = { country = MAN country = JAP } 
		NOT = { metal = 700 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 22025 }
	}
}

event = {
	id = 22034
	random = no 
	country = MAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnRares
		puppet = { country = MAN country = JAP } 
		NOT = { rare_materials = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 22028 }
	}
}

event = {
	id = 22035
	random = no 
	country = MAN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnOil
		puppet = { country = MAN country = JAP } 
		NOT = { oil = 900 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 22031 }
	}
}

event = {
	id = 22036
	random = no 
	country = MEN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnEnergy
		puppet = { country = MEN country = JAP } 
		NOT = { energy = 900 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 22022 }
	}
}

event = {
	id = 22037
	random = no 
	country = MEN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnMetal
		puppet = { country = MEN country = JAP } 
		NOT = { metal = 700 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 22025 }
	}
}

event = {
	id = 22038
	random = no 
	country = MEN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnRares
		puppet = { country = MEN country = JAP } 
		NOT = { rare_materials = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 22028 }
	}
}

event = {
	id = 22039
	random = no 
	country = MEN
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnOil
		puppet = { country = MEN country = JAP } 
		NOT = { oil = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 22031 }
	}
}

event = {
	id = 22040
	random = no 
	country = SIA
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnEnergy
		OR = {
			atwar = no
			puppet = { country = SIA country = JAP } 
		}
		NOT = { energy = 900 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 22022 }
	}
}

event = {
	id = 22041
	random = no 
	country = SIA
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnMetal
		OR = {
			atwar = no
			puppet = { country = SIA country = JAP } 
		}
		NOT = { metal = 700 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 22025 }
	}
}

event = {
	id = 22042
	random = no 
	country = SIA
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnRares
		OR = {
			atwar = no
			puppet = { country = SIA country = JAP } 
		}
		NOT = { rare_materials = 500 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 22028 }
	}
}

event = {
	id = 22043
	random = no 
	country = SIA
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnOil
		OR = {
			atwar = no
			puppet = { country = SIA country = JAP } 
		}
		NOT = { oil = 900 }
		supplies = 160 # 10 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 22031 }
	}
}


event = {
	id = 22044
	random = no 
	country = CHI
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnEnergy
		puppet = { country = CHI country = JAP } 
		NOT = { energy = 900 }
		supplies = 300 # 150 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = energypool value = 60 }
		command = { type = supplies value = -15 } # 60 x 1 / 6 x 1.5
		command = { type = trigger which = 22022 }
	}
}

event = {
	id = 22045
	random = no 
	country = CHI
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnMetal
		puppet = { country = CHI country = JAP } 
		NOT = { metal = 700 }
		supplies = 300 # 150 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = metalpool value = 60 }
		command = { type = supplies value = -30 } # 60 x 2 / 6 x 1.5
		command = { type = trigger which = 22025 }
	}
}

event = {
	id = 22046
	random = no 
	country = CHI
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnRares
		puppet = { country = CHI country = JAP } 
		NOT = { rare_materials = 500 }
		supplies = 300 # 150 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = rarematerialspool value = 60 }
		command = { type = supplies value = -60 } # 60 x 4 / 6 x 1.5
		command = { type = trigger which = 22028 }
	}
}

event = {
	id = 22047
	random = no 
	country = CHI
	persistent = yes
	
	trigger = {
		ai = yes
		ai = JAP
		flag = JapanNotLowOnOil
		puppet = { country = CHI country = JAP } 
		NOT = { oil = 900 }
		supplies = 300 # 150 left at worst
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 0 month = january year = 1936}
	offset = 1
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = oilpool value = 60 }
		command = { type = supplies value = -45 } # 60 x 3 / 6 x 1.5
		command = { type = trigger which = 22031 }
	}
}

################
# The AI must keep reserves of manpower
#############################################
#
#event = {
#	id = 22018
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		NOT = { local_flag = Reserve150 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve150 }
#	}
#}
#
#event = {
#	id = 22019
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve150
#		NOT = { local_flag = Reserve300 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve300 }
#	}
#}
#
#event = {
#	id = 22020
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve300
#		NOT = { local_flag = Reserve450 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve450 }
#	}
#}
#
#event = {
#	id = 22021
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve450
#		NOT = { local_flag = Reserve600 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve600 }
#	}
#}
#
#event = {
#	id = 22022
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve600
#		NOT = { local_flag = Reserve750 }
#		manpower = 250
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = -150 }
#		command = { type = local_setflag which = Reserve750 }
#	}
#}
#
#event = {
#	id = 22023
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve750
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve750 }
#	}
#}
#
#event = {
#	id = 22024
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve600
#		NOT = { local_flag = Reserve750 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve600 }
#	}
#}
#
#event = {
#	id = 22025
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve450
#		NOT = { local_flag = Reserve600 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve450 }
#	}
#}
#
#event = {
#	id = 22026
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve300
#		NOT = { local_flag = Reserve450 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve300 }
#	}
#}
#
#event = {
#	id = 22027
#	random = no
#	country = JAP
#	persistent = yes
#	
#	trigger = {
#		ai = yes
#		local_flag = Reserve150
#		NOT = { local_flag = Reserve300 }
#		NOT = { manpower = 20 }
#	}
#	
#	name = "AI_EVENT"
#	style = 0
#	
#	date = { day = 1 month = january year = 1936 }
#	offset = 1
#	deathdate = { day = 29 month = december year = 1999 }
#
#	action_a = {
#		command = { type = manpowerpool value = 150 }
#		command = { type = local_clrflag which = Reserve150 }
#	}
#}
#
####################################
################
# Japan AI Slider manipulation
#
#	Free Market
#############################################
event = { # Free Market
	id = 22991
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = free_market value = 1 }
		government = democratic
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = free_market value = 1 }
	}
}
event = { # Free Market
	id = 22992
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = free_market value = -1 }
		OR = {
			government = fascist
			government = communist
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = free_market value = -1 }
	}
}
################
#	Open Society
#############################################
event = { # Open Society
	id = 22993
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = freedom value = -1 }
		AND = {
			domestic = { type = freedom value = 0 }
			OR = {
				government = fascist
				government = communist
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = freedom value = -1 }
	}
}
event = { # Open Society
	id = 22994
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = {type = freedom value = 1}
		AND = {
			#NOT = { domestic = { type = freedom value = 9 } }
			government = democratic
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = freedom value = 1 }
	}
}
################
#	Standing Army
#############################################
event = { # Standing Army
	id = 22995
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = professional_army value = 1 }
		AND = {
			#NOT = { domestic = { type = professional_army value = 9 } }
			OR = {
				government = fascist
				government = communist
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = professional_army value = 1 }
	}
}
event = { # Standing Army
	id = 22996
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = professional_army value = -1 }
		AND = {
			domestic = { type = professional_army value = 0 }
			government = democratic
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = professional_army value = -1 }
	}
}
################
#	Hawk Lobby
#############################################
event = { # Hawk Lobby
	id = 22997
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = defense_lobby value = 1 }
		AND = {
			#NOT = { domestic = { type = defense_lobby value = 9 } }
			OR = {
				government = fascist
				government = communist
				atwar = yes
			}
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = defense_lobby value = 1 }
	}
}
event = { # Hawk Lobby
	id = 22998
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = defense_lobby value = -1 }
		AND = {
			#domestic = { type = defense_lobby value = 0 }
			government = democratic	
			atwar = no
			NOT = { year = 1940 }
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = defense_lobby value = -1 }
	}
}
################
#	Interventionism
#############################################
event = { # Interventionism
	id = 22999
	random = no
	country = JAP
	persistent = yes

	trigger = {
		ai = yes
		can_change_policy = { type = interventionism value = 1 }
		#NOT = { domestic = { type = interventionism value = 9 } }
		OR = {
			atwar = yes
			government = fascist
			government = communist
		}
	}

	name = "AI_EVENT"
	style = 0

	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1955 }

	action_a = {
		command = { type = change_policy which = interventionism value = 1 }
	}
}

####################################
# Japan 22500 - 22599 = Minister Change Events
####################################
################
# Minister of Security Section 22500 - 22509
#############################################
event = { # Ushio Shigenosuke takes power
	id = 22500
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 5105 # Ushio Shigenosuke
		NOT = { InCabinet = 5105 }
		OR = {
			NOT = { war = { country = JAP country = CHI } }
			NOT = {
				war = { country = JAP country = CHI }
				OR = {
						minister = 5115 # Fujie Keisuke
						minister = 5123 # Tojo Hideki
				}
				OR = {
					lost_national = { country = CHI value = 10 }
					control = { province = 1235 data = JAP } # Nanjing
				}
			}
		}
		OR = {
			manpower = 200
			NOT = { minister = 5099 } # Kawarada Kakichi
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 5105 }
		command = { type = dissent value = -1 }
	}
}
event = { # Goto Fumio takes power
	id = 22501
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { minister = 5105 } # Ushio Shigenosuke
		minister = 5005 # Goto Fumio
		NOT = { InCabinet = 5005 }
		OR = {
			NOT = { war = { country = JAP country = CHI } }
			NOT = {
				war = { country = JAP country = CHI }
				OR = {
						minister = 5115 # Fujie Keisuke
						minister = 5123 # Tojo Hideki
				}
				OR = {
					lost_national = { country = CHI value = 10 }
					control = { province = 1235 data = JAP } # Nanjing
				}
			}
		}
		OR = {
			manpower = 200
			NOT = { minister = 5099 } # Kawarada Kakichi
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 5005 }
		command = { type = dissent value = -1 }
	}
}
event = { # Kawarada Kakichi takes power
	id = 22502
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		NOT = { manpower = 200 }
		minister = 5099 # Kawarada Kakichi
		NOT = { InCabinet = 5099 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 5099 }
		command = { type = dissent value = -1 }
	}
}
event = { # Tojo Hideki takes power
	id = 22503
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 5123 # Tojo Hideki
		NOT = { InCabinet = 5123 }
		war = { country = JAP country = CHI }
		OR = {
			lost_national = { country = CHI value = 10 }
			control = { province = 1235 data = JAP } # Nanjing
		}
		OR = {
			manpower = 200
			NOT = { minister = 5099 } # Kawarada Kakichi
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 5123 }
		command = { type = dissent value = -1 }
	}
}
event = { # Fujie Keisuke takes power
	id = 22504
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 5115 # Fujie Keisuke
		NOT = { InCabinet = 5115 }
		NOT = { minister = 5123 } # Tojo Hideki
		war = { country = JAP country = CHI }
		OR = {
			lost_national = { country = CHI value = 10 }
			control = { province = 1235 data = JAP } # Nanjing
		}
		OR = {
			manpower = 200
			NOT = { minister = 5099 } # Kawarada Kakichi
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofsecurity which = 5115 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Staff Section 22510 - 22519
#############################################
event = { # Kanichiro Tashiro takes power
	id = 22510
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 5150 # Kanichiro Tashiro
		NOT = { InCabinet = 5150 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 5150 }
		command = { type = dissent value = -1 }
	}
}
event = { # Sugiyama Hajime takes power
	id = 22511
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		NOT = { minister = 5150 } # Kanichiro Tashiro
		minister = 5155 # Sugiyama Hajime
		NOT = { InCabinet = 5155 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 5155 }
		command = { type = dissent value = -1 }
	}
}
event = { # Hirotsugu Hayashida takes power
	id = 22512
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = no
		minister = 5149 # Hirotsugu Hayashida
		NOT = { InCabinet = 5149 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofstaff which = 5149 }
		command = { type = dissent value = -1 }
	}
}
################
# Head of Intelligence Section 22520 - 22529
#############################################
event = { # Takasu Shiro takes power
	id = 22520
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 5134 # Takasu Shiro
		NOT = { InCabinet = 5134 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = ministerofintelligence which = 5134 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of the Army Section 22530 - 22539
#############################################
event = { # Sugiyama Hajime takes power
	id = 22530
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		minister = 5165 # Sugiyama Hajime
		NOT = { InCabinet = 5165 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofarmy which = 5165 }
		command = { type = dissent value = -1 }
	}
}
event = { # Inanba Satoru takes power
	id = 22531
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = no
		minister = 5160 # Inanba Satoru
		NOT = { InCabinet = 5160 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofarmy which = 5160 }
		command = { type = dissent value = -1 }
	}
}
################
# Armament Minister Section 22540 - 22549
#############################################
event = { # Fujiwara Ginjiro takes power
	id = 22540
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 5084 # Fujiwara Ginjiro
		NOT = { InCabinet = 5084 }
		OR = {
			war = { country = JAP country = USA }
			war = { country = JAP country = ENG }
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = armamentminister which = 5084 }
		command = { type = dissent value = -1 }
	}
}
event = { # Hatta Yoshiaki takes power
	id = 22541
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 5082 # Hatta Yoshiaki
		NOT = { InCabinet = 5082 }
		OR = {
			NOT = { minister = 5084 } # Fujiwara Ginjiro
			AND = {
				minister = 5084 # Fujiwara Ginjiro
				NOT = { war = { country = JAP country = USA } }
				NOT = { war = { country = JAP country = ENG } }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = armamentminister which = 5082 }
		command = { type = dissent value = -1 }
	}
}
event = { # Shoda Kazue takes power
	id = 22542
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 5090 # Shoda Kazue
		NOT = { InCabinet = 5090 }
		OR = {
			AND = {
				NOT = { minister = 5082 } # Hatta Yoshiaki
				NOT = { minister = 5084 } # Fujiwara Ginjiro
			}
			AND = {
				NOT = { minister = 5082 } # Hatta Yoshiaki
				minister = 5084 # Fujiwara Ginjiro
				NOT = { war = { country = JAP country = USA } }
				NOT = { war = { country = JAP country = ENG } }
			}
		}
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = armamentminister which = 5090 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Air Minister Section 22550 - 22559
# Air AI Flags
#	JAPAirAINaval	= Naval Priority for bombardment
#	JAPAirAIGround	= Ground support is a priority
#############################################
event = { # Yamamoto Isoroku takes power
	id = 22550
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		local_flag = JAPAirAINaval
		minister = 5010 # Yamamoto Isoroku
		NOT = { InCabinet = 5010 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofair which = 5010 }
		command = { type = dissent value = -1 }
	}
}
event = { # Inoue Shigeyoshi takes power
	id = 22551
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		local_flag = JAPAirAINaval
		minister = 5180 # Inoue Shigeyoshi
		NOT = { InCabinet = 5180 }
		NOT = { minister = 5010 } # Yamamoto Isoroku
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofair which = 5180 }
		command = { type = dissent value = -1 }
	}
}
event = { # Tojo Hideki takes power
	id = 22552
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		local_flag = JAPAirAIGround
		minister = 5191 # Tojo Hideki
		NOT = { InCabinet = 5191 }
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofair which = 5191 }
		command = { type = dissent value = -1 }
	}
}
event = { # Tsukahara Nishizou takes power
	id = 22553
	random = no 
	country = JAP
	persistent = yes
	
	trigger = {
		ai = yes
		local_flag = JAPAirAIGround
		minister = 5181 # Tsukahara Nishizou
		NOT = { InCabinet = 5181 }
		NOT = { minister = 5191 } # Tojo Hideki
	}

	name = "AI_EVENT"
	style = 0
	
	date = { day = 1 month = january year = 1936 }
	offset = 7
	deathdate = { day = 29 month = december year = 1999 }

	action_a = {
		command = { type = chiefofair which = 5181 }
		command = { type = dissent value = -1 }
	}
}
